//
//  CollectionViewCell.m
//  Education
//
//  Created by 流风幻雾 on 15/7/15.
//  Copyright (c) 2015年 HUA. All rights reserved.
//

#import "EnglishCollectionViewCell.h"

@implementation EnglishCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if(self)
    {
        self.imageview = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kScreenHeight * 0.22,kScreenHeight * 0.22)];
        self.imageview.layer.cornerRadius = _imageview.bounds.size.height / 2;
        self.imageview.layer.borderColor = [[UIColor whiteColor]CGColor];
        self.imageview.layer.masksToBounds = YES;
        self.imageview.layer.borderWidth = 1;
        [self.contentView addSubview:self.imageview];
        
        self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, kScreenHeight * 0.22 + 5, kScreenHeight * 0.22, kScreenWidth * 0.08)];
        self.nameLabel.font = [UIFont fontWithName:nil size:13];
        self.nameLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_nameLabel];
    }
    return self;
}

- (void)setValueWithModel:(CollectionViewModel *)model indexpath:(NSIndexPath *)indexpath
{
    self.imageview.image = model.imageArray[indexpath.item];
    self.nameLabel.text = model.nameArray[indexpath.item];
    
}
@end
